﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using cecbData;

namespace CECB
{
    /// <summary>
    /// Interaction logic for TestReport1.xaml
    /// </summary>
    public partial class TestReport1 : Window
    {
        DSSEntities dx;
        public TestReport1()
        {
            InitializeComponent();
            dx = new DSSEntities();


            ReportDocument report = new ReportDocument();
            report.Load("../../CrystalReport1.rpt");
            using (dx) 
            {
                report.SetDataSource(from c in dx.Projects
                                     select new { c.proj_id, c.proj_name , c.proj_reference });
            }
            crystalReportsViewer1.ViewerCore.ReportSource = report;


        }
    }
}
